<%-- 
    Document   : orderProductDetails
    Created on : May 14, 2012, 5:17:26 PM
    Author     : ciummo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


<script type="text/javascript">
    function setReady(serialeProdotto){
        var mess = window.confirm("Impostare il prodotto come pronto con il messaggio: ")
        window.location="Validate.do?method=validateFinal&serialeProdotto="+serialeProdotto+"&mess="+mess;
       
    }
</script>
    

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="/DGestWebServer/css/dgest.css"/>
        
        <title>Ordine Articolo Dettaglio</title>
    </head>
    <body>
        
         <%@ include file="../adminDialogBar.jspf" %> 
         
         <logic:equal name="LoginActionForm" property="role" value="Admin Dialog" scope="session">
            
            <html:link href="OrderProduct.do?method=modifyOrderProduct" paramId="idOrderProduct" paramName="OrderProductActionForm" paramProperty="idOrdineProdotto"><img src="/DGestWebServer/images/orderArticleEdit.png" alt="Modifica Ordine Articolo" height="75px" width="75px"/></html:link>
            <html:link href="/OrderProduct.do?method=deleteOrderProduct" paramId="idOrderProduct" paramName="OrderProductActionForm" paramProperty="idOrdineProdotto"><img src="/DGestWebServer/images/orderArticleDelete.png" alt="Modifica Ordine Articolo" height="75px" width="75px"/></html:link>
        </logic:equal>
         
         
         
                <h2>Dettagli Ordine Articolo</h2>
    <table class="center">

        <tr>
            <th>Id Ordine di Articolo: </th>
            <td><bean:write name="OrderProductActionForm" property="idOrdineProdotto"/></td>
        </tr>       
        <tr>
            <th>Codice Articolo: </th>
            <td><bean:write name="OrderProductActionForm" property="codArticolo"/></td>
        </tr>  
        <tr>
            <th>Prezzo: </th>
            <td><bean:write name="OrderProductActionForm" property="prezzo"/></td>
        </tr>
        <tr>
            <th>Quantita: </th>
            <td><bean:write name="OrderProductActionForm" property="quantita"/></td>
        </tr>
        <tr>
            <th>Sconto: </th>
            <td><bean:write name="OrderProductActionForm" property="sconto"/></td>
        </tr>
        <tr>
            <th>Unita' di Misura: </th>
            <td><bean:write name="OrderProductActionForm" property="unitaMisura"/></td>
        </tr>
        <tr>
            <th>Stato: </th>
            <td><bean:write name="OrderProductActionForm" property="stato"/></td>
        </tr>
        <tr>
            <th>Note: </th>
            <td><bean:write name="OrderProductActionForm" property="note"/></td>
        </tr>
        <tr>
            <th>Mancanti: </th>
            <td><bean:write name="OrderProductActionForm" property="mancanti"/></td>
        </tr>
        <tr>
            <th>Id Ordine di Riferimento: </th>
            <td><bean:write name="OrderProductActionForm" property="ordineidOrdine"/></td>
        </tr> 
        
    </table> 
        
        <br>
        
        <div id="subMenu">
        
        

        <logic:notEqual name="OrderProductActionForm" property="stato" value="Completo">
        
        <html:link href="Product.do?method=newProduct" paramId="idOrderProduct" paramName="OrderProductActionForm" paramProperty="idOrdineProdotto"><img src="/DGestWebServer/images/add.png" alt="Aggiungi Prodotto" height="50px" width="50px"/></html:link>
        </logic:notEqual>
        </div>
        
        <h3>Lista Prodotti dell'Ordine</h3>
        
        <table class="objectList">
                        <thead>
                            <tr>
                                <th>Seriale</th>
                                <th>data produzione</th>
                                <th>stato</th>
                                <th> opzioni </th>
                                
                            </tr>
                        </thead>

                        <tbody>

                            <logic:iterate id="product" name="ProductActionForm" property="list" indexId="index" >
                                <pg:item>
                                    <tr>
                                        
                                        <logic:equal name="product" property="stato" value="Da Validare">
                                        
                                        <td><bean:write name="product" property="serialeProdotto"></bean:write></td>
                                        <td><bean:write name="product" property="dataProduzione"></bean:write></td>
                                        <td><bean:write name="product" property="stato"></bean:write></td>
                                        <td>
                                        <a href="#" onclick="setReady('<bean:write name="product" property="serialeProdotto"/>')"><img src="/DGestWebServer/images/validazione.png" alt="Imposta come Pronto" height="25px" width="25px"/></a>
                                        <html:link href="Validate.do?method=validateProduct" paramId="serialeProdotto" paramName="product" paramProperty="serialeProdotto"><img src="/DGestWebServer/images/checkView.jpg" alt="Verifica" height="25px" width="25px"/></html:link></td>

                                    
                                        </logic:equal>
                                        
                                        </tr>    
                                    
                                    
                                    
                                </pg:item>
                            </logic:iterate>                              
                            
                            
                            
                            <logic:iterate id="product" name="ProductActionForm" property="list" indexId="index" >
                                <pg:item>
                                    <tr>
                                        
                                        <logic:equal name="product" property="stato" value="In Verifica">
                                            
                                        <td><bean:write name="product" property="serialeProdotto"></bean:write></td>
                                        <td><bean:write name="product" property="dataProduzione"></bean:write></td>
                                        <td><bean:write name="product" property="stato"></bean:write></td>
                                        <td><html:link href="Validate.do?method=validateProduct" paramId="serialeProdotto" paramName="product" paramProperty="serialeProdotto"><img src="/DGestWebServer/images/checkView.jpg" alt="Verifica" height="25px" width="25px"/></html:link></td>
                                        </logic:equal>
                                        
                                    </tr>    
                                </pg:item>
                            </logic:iterate>

                            <logic:iterate id="product" name="ProductActionForm" property="list" indexId="index" >
                                <pg:item>
                                    <tr>
                                        
                                        <logic:equal name="product" property="stato" value="Nuovo">
                                        
                                        <td><bean:write name="product" property="serialeProdotto"></bean:write></td>
                                        <td><bean:write name="product" property="dataProduzione"></bean:write></td>
                                        <td><bean:write name="product" property="stato"></bean:write></td>
                                    
                                        <td><html:link href="Validate.do?method=validateProduct" paramId="serialeProdotto" paramName="product" paramProperty="serialeProdotto"><img src="/DGestWebServer/images/checkView.jpg" alt="Verifica" height="25px" width="25px"/></html:link></td>
                                    
                                        </logic:equal>
                                        
                                        </tr>    
                                    
                                    
                                    
                                </pg:item>
                            </logic:iterate>                        
 

                            <logic:iterate id="product" name="ProductActionForm" property="list" indexId="index" >
                                <pg:item>
                                    <tr>
                                        
                                        <logic:equal name="product" property="stato" value="Pronto">
                                        
                                        <td><bean:write name="product" property="serialeProdotto"></bean:write></td>
                                        <td><bean:write name="product" property="dataProduzione"></bean:write></td>
                                        <td><bean:write name="product" property="stato"></bean:write></td>
                                        <td><html:link href="Validate.do?method=printCheckList" paramId="serialeProdotto" paramName="product" paramProperty="serialeProdotto"><img src="/DGestWebServer/images/printPDF.png" alt="Stampa in PDF" height="25px" width="25px"/></html:link>
                                        <td>
                                        <html:link href="Validate.do?method=validateProduct" paramId="serialeProdotto" paramName="product" paramProperty="serialeProdotto"><img src="/DGestWebServer/images/checkView.jpg" alt="Verifica" height="25px" width="25px"/></html:link></td>
                                        </logic:equal>
                                        
                                        </tr>    
                                    
                                    
                                    
                                </pg:item>
                            </logic:iterate>                            
                        
                        </tbody>
                    </table>
        
        
    </body>
</html>
